<template>
    <div class="my" @touchmove="mousemove()" @touchend="mouseend()" >
        <!-- <ComHeader title="个人中心" leftArrow='true' /> -->
        <!-- <div class="title">个人中心</div> -->
        <My-Container></My-Container>
        <ComFooter />
    </div>
</template>

<script>
import ComFooter from '@/common/ComFooter'
import ComHeader from '@/common/ComHeader'
import MyContainer from './component/MyContainer'
export default {
  name: "my",
  data(){
      return{
        arr:[],
      }
  },
  components:{
      ComHeader,
      MyContainer,
      ComFooter
  },
  created() {
      document.title = '我的'
  },
  methods:{
    mousemove(e){
        var e = e ||window.event
        var endX = e.touches[0].clientX;
        this.arr.push(endX)
    },
    mouseend(){
    if(this.arr[0]-this.arr[this.arr.length-1]>150){
        // this.$router.push({
        //     path: "/msg"
        // }) 
    }else if(this.arr[0]-this.arr[this.arr.length-1]<-150){
        this.$router.push({
            path: "/msg"
        }) 
    }
    this.arr=[]
    },
  }
}
</script>


<style lang="stylus" scoped>
    .title{
        text-align: center;color: #000;background-color: #fff;height 1.45rem;font-size: 24px;
        text-align: center;font-size: 0.45rem;line-height: 1.45rem;}
</style>
